import Vue from 'vue'

import Vuex from 'vuex'
Vue.use(Vuex)

const store = new Vuex.Store({
	state:{
		address:null,
		orderInfo:null
	},
	mutations:{
		setTime:(state,payload)=>{
			console.log(payload)
			state.time = payload.time
		},
		setAddress:(state,payload)=>{
			state.address = payload.address
		},
		setOrderInfo:(state,newInfo)=>{
			state.orderInfo = newInfo.orderInfo
			state.address = newInfo.orderInfo.shopUserAddress
		}
	},
	actions:{
		
	}
})
export default store